package _set;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class setmethod {
    public static void main(String[] args) {
        Set set = new HashSet<>();
        set.add("set");
        set.add("fuck");
        set.add("joay");
        set.add(null);
        System.out.println("set="+set);
        Iterator i = set.iterator();
        while(i.hasNext()){
            System.out.println(i.next());
        }
        set.remove("fuck");
        System.out.println(set);
 
    }
}
